package edu.predatorwars.client.visualization;

import java.awt.Point;

import edu.predatorwars.shared.models.Buff;
import edu.predatorwars.shared.models.PlayerConnectionInfo;
import edu.predatorwars.shared.models.Resource;

public class ResourceExt extends Resource {
	

	//location of the animal on the hexgrid
	private Point resourceLocation;

	public ResourceExt(Resource resource, int x, int y) {
		super(resource.getResourceType(), resource.getDescription(), resource.getBuffs());
		resourceLocation = new Point(x,y);
	}
	
	public ResourceExt(Resource resource, Point p) {
		super(resource.getResourceType(), resource.getDescription(), resource.getBuffs());
		resourceLocation = p;
	}
	
	public void setResourceLocation(Point loc) {
		resourceLocation = loc;
	}
	
	public void setResourceLocation(int x, int y) {
		resourceLocation.x = x;
		resourceLocation.y = y;
		
	}
	
	public Point getResourceLocation() {
		return resourceLocation;
	}
	
	//equals is equality based on resource type and location
	/*
	@Override
	public boolean equals(Object o) {
		if (o instanceof VisResource) {
			ResourceExt re = ((VisResource) o).getResource();
			int type = re.getResourceType();
			Point p1 = re.getResourceLocation();
			return type == this.getResourceType() && p1.equals(this.resourceLocation);
		}
		else {
			return super.equals(o);
		}
	}
	*/
	
}